package Thread;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
public class Demo4 {
    //生产者消费者进程模拟
    public static void main(String[] args) {
        BlockingQueue<Integer> bq=new ArrayBlockingQueue(1000);
        //生产者：while应该放哪？
        int count =1;
            Thread t1 =new Thread(()->{
                try {
                    bq.put(count);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
                System.out.println();
            });
        }
}
